/* Training Wizard Styles */

/* Alpine.js x-cloak - hide elements until Alpine loads */
[x-cloak] {
    display: none !important;
}

/* Modal Backdrop - ensure proper z-index */
.training-wizard-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    cursor: pointer;
}

/* Wizard Launch Button */
.wizard-launch-btn {
    width: 100%;
    margin-bottom: 0.75rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transition: all 0.2s;
}

.wizard-launch-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.wizard-launch-btn:active {
    transform: translateY(0);
}

/* Training Wizard Modal */
.training-wizard-modal {
    width: 90vw;
    max-width: 900px;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    cursor: default;
    pointer-events: auto;
}

.training-wizard-modal .modal-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1.5rem 2rem;
    flex-shrink: 0;
}

.training-wizard-modal .modal-title {
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 600;
}

.training-wizard-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 2rem 1.5rem;
}

.training-wizard-modal .modal-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1.5rem 2rem;
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.training-wizard-modal .modal-footer .flex-grow-1 {
    flex-grow: 1;
}

/* Wizard Progress Indicator */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(0, 0, 0, 0.2);
    overflow-x: hidden;
    flex-shrink: 0;
    gap: 0.5rem;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    max-width: 120px;
    position: relative;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.wizard-step.active {
    opacity: 1;
}

.wizard-step.completed {
    opacity: 0.7;
}

.wizard-step.skipped {
    opacity: 0.3;
}

.wizard-step.skipped .step-label {
    text-decoration: line-through;
}

/* Progress connectors */
.wizard-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: calc(50% + 18px);
    right: calc(-50% + 18px);
    height: 2px;
    background: rgba(148, 163, 184, 0.2);
    z-index: 0;
}

.wizard-step.completed:not(:last-child)::after {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.1);
    border: 2px solid rgba(148, 163, 184, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.wizard-step.active .step-number {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.wizard-step.completed .step-number {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    border-color: #15803d;
    color: transparent;
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.45);
}

.wizard-step.completed .step-number::before {
    content: '✓';
    position: absolute;
    color: #f0fdf4;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.step-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
    width: 100%;
}

.wizard-step.active .step-label {
    color: #f8fafc;
    font-weight: 500;
}

/* Wizard Content */
.wizard-step-content {
    min-height: 400px;
    padding: 1.5rem 0;
}

.wizard-question {
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.wizard-question-small {
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Wizard Options */
.wizard-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.wizard-options-inline {
    display: flex;
    gap: 0.75rem;
}

.wizard-option-card {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.wizard-option-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(148, 163, 184, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.wizard-option-card.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.wizard-option-card.selected::before {
    content: '✓';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 24px;
    height: 24px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

.wizard-option-card h6 {
    color: #f8fafc;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.wizard-option-card .option-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.wizard-option-card .text-muted {
    color: #94a3b8 !important;
}

/* Wizard Input Group */
.wizard-input-group {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.wizard-input-group label {
    display: block;
    color: #e2e8f0;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.wizard-input-group .form-control,
.wizard-step-content .form-control {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #f8fafc;
}

.wizard-input-group .form-control:focus,
.wizard-step-content .form-control:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    color: #f8fafc;
}

.wizard-input-group .form-control::placeholder,
.wizard-step-content .form-control::placeholder {
    color: #64748b;
}

.wizard-input-group .form-text {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.wizard-input-group .form-text a {
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
}

.wizard-input-group .form-text a:hover {
    color: #60a5fa;
}

/* Help Text */
.wizard-help-text {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 6px;
    color: #cbd5e1;
}

/* Review Summary */
.review-summary {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
}

.review-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.review-item:last-child {
    border-bottom: none;
}

.review-item label {
    flex: 0 0 150px;
    color: #94a3b8;
    font-weight: 500;
    margin: 0;
}

.review-item span {
    flex: 1;
    color: #f8fafc;
}

.review-item .btn-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.review-item .btn-link:hover {
    text-decoration: underline;
    color: #60a5fa;
}

/* Alert Styling in Wizard */
.wizard-step-content .alert {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #e2e8f0;
}

.wizard-step-content .alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.wizard-step-content .alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #e2e8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .training-wizard-modal {
        max-width: 95vw;
        max-height: 95vh;
    }

    .wizard-progress {
        overflow-x: scroll;
        padding: 1rem;
    }

    .wizard-step {
        min-width: 60px;
    }

    .step-label {
        font-size: 0.65rem;
    }

    .wizard-options {
        grid-template-columns: 1fr;
    }

    .wizard-step-content {
        min-height: 300px;
        padding: 1.5rem;
    }

    .review-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .review-item label {
        flex: none;
    }
}

/* Dark theme text colors */
.wizard-step-content .text-muted {
    color: #94a3b8 !important;
}

.wizard-step-content p {
    color: #cbd5e1;
}

/* Ensure form elements are visible */
.wizard-step-content textarea.form-control {
    min-height: 100px;
}

/* Button styling in wizard */
.wizard-step-content .btn-sm {
    padding: 0.375rem 0.75rem;
}
